/*
 * Link.h
 *
 *  Created on: Feb 19, 2011
 *      Author: Anton
 */


#ifndef LINK_H_
#define LINK_H_

#include "Matrix.h"

#define PI 3.14159
#define DEG2RAD (PI/180)
#define RAD2DEG (180/PI)

class Link {
public:
	Link();
	virtual ~Link();
    Matrix getCG() const;
    double getCGtip_x() const;
    double getCGtip_y() const;
    double getCGtip_z() const;
    Matrix getDH() const;
    double getDdq() const;
    double getDdq_old() const;
    double getDq() const;
    double getDq_old() const;
    double getI() const;
    double getLength() const;
    double getMass() const;
    double getOld() const;
    double getQ() const;
    double getTau() const;
    double getTipx() const;
    double getTipy() const;
    double getTipz() const;
    void printInfo();
    void setCG(Matrix &);
    void setCGtip_x(double CGtip_x);
    void setCGtip_y(double CGtip_y);
    void setCGtip_z(double CGtip_z);
    void setDH(Matrix &);
    void setDdq(double ddq);
    void setDdq_old(double ddq_old);
    void setDq(double dq);
    void setDq_old(double dq_old);
    void setLength(double length);
    void setMass(double mass);
    void setOld(double q_old);
    void setQ(double q);
    void setTau(double tau);
    void setTipx(double tipx);
    void setTipy(double tipy);
    void setTipz(double tipz);
    Matrix forwardK();

private:
	double length;
	double mass;
	Matrix DH;
	Matrix CG;
	double q;
	double dq;
	double ddq;
	double q_old;
	double dq_old;
	double ddq_old;
	double tau;
	double tipx;
	double tipy;
	double tipz;
	double CGtip_x;
	double CGtip_y;
	double CGtip_z;
};

#endif /* LINK_H_ */
